package com.example.demo.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 订单详情表(OrderDetail)表实体类
 *
 * @author ElonChung
 * @since 2020-05-12 20:45:40
 */
@SuppressWarnings("serial")
@Data
@TableName("`tb_order_detail`")
public class OrderDetail extends Model<OrderDetail> {
    private static final long serialVersionUID = 574670091234734951L;
    /**
    * id
    */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty( name ="id", value="id")
    private Integer id;
    /**
    * 订单id
    */    
    @ApiModelProperty( name ="orderId", value="订单id")
    private Integer orderId;
    /**
    * 商品id
    */    
    @ApiModelProperty( name ="goodsId", value="商品id")
    private Integer goodsId;
    /**
    * 价格
    */    
    @ApiModelProperty( name ="price", value="价格")
    private BigDecimal price;
    /**
    * 数量
    */    
    @ApiModelProperty( name ="count", value="数量")
    private Integer count;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    }